package com.socialuni.center.web.controller;

import com.socialuni.center.web.serive.api.MockApplySocialOAuthService;
import com.socialuni.sdk.api.model.ResultRO;
import com.socialuni.sdk.model.RO.SocialOAuthUserRO;
import com.socialuni.sdk.model.RO.UniLoginRO;
import com.socialuni.sdk.api.MockAPI;
import com.socialuni.sdk.model.QO.MockQO;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class MockController implements MockAPI {
    @Resource
    MockApplySocialOAuthService mockApplySocialOAuthService;

    public ResultRO<UniLoginRO<SocialOAuthUserRO>> mockOAuthUserInfo(MockQO mockQO) {
        UniLoginRO<SocialOAuthUserRO> applySocialUniOAuthRO = mockApplySocialOAuthService.mockOAuthUserInfo(mockQO.getMpType());
        return new ResultRO<>(applySocialUniOAuthRO);
    }

    public ResultRO<UniLoginRO<SocialOAuthUserRO>> mockOAuthUserPhoneNum(MockQO mockQO) {
        UniLoginRO<SocialOAuthUserRO> applySocialUniOAuthRO = mockApplySocialOAuthService.mockOAuthUserPhoneNum(mockQO.getMpType());
        return new ResultRO<>(applySocialUniOAuthRO);
    }
}